export function formatCounter(counter) {
	return counter > 100000000 ? 
				 (counter / 100000000).toFixed(1) + '亿' :
				 counter > 100000 ?
				 (counter / 10000).toFixed(1) + '万' :
				 counter
}

function padLeftZero(time) {
  time = time + ""
  return ("00" + time).slice(time.length)
}

export function formatTime(duration) {
	duration = duration / 1000
	  // 488s / 60 = 8.12
	const minute = Math.floor(duration / 60)
	// 488s % 60
	const second = Math.floor(duration) % 60

	return padLeftZero(minute) + ":" + padLeftZero(second)
}